import VueRouter from 'vue-router';
import Vue from 'vue';

import Homepage from '../pages/homepage';
import Home from '../pages/home';
import Login from '../pages/login';
import Mine from '../pages/mine';
import Qa from '../pages/qa';
import Video from '../pages/video';
import Settings from '../pages/settings';
import Message from '../pages/message';
import Detail from '../pages/detail';
// more pages here

Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        component: Homepage,
        children: [
            { path: '/', component: Home },
            { path: '/qa', component: Qa },
            { path: '/video', component: Video },
            { path: '/mine', component: Mine },
            // more routes here
        ],
    },
    {
        path: '/login',
        component: Login,
    },
    {
        path: '/settings',
        component: Settings,
    },
    {
        path: '/message',
        component: Message,
    },
    {
        path: '/detail',
        component: Detail,
    },
    // more routes here
];

export default new VueRouter({ routes });
